import request from '@/utils/request'


/**
 * @description 上传视频 / 修改视频信息共用接口
 * 注：上传视频不传视频id，修改视频时需要传视频ID，且修改视频时原字段未修改时也需要带上原有字段及值
 * @author Jim
 * @date 2021-02-02
 * @param data
 */
export function addModifyVideo(data) {
  return request({
    url: '/video/addormodify/video',
    method: 'post',
    data
  })
}


/**
 * @description 分页条件查询视频列表
 * @author Jim
 * @date 2021-02-02
 * @param params
 */
export function getVideoList(params) {
  return request({
    url: '/video/list',
    method: 'get',
    params
  })
}


/** 
 * @description 增加视频分类
 * @author Jim
 * @date 2021-02-02
 * @param data
 */
export function addVideoCategory(data) {
  return request({
    url: '/video/add/category',
    method: 'post',
    data
  })
}

/** 
 * @description 修改视频分类
 * @author Jim
 * @date 2021-02-18
 * @param params
 */
export function modifyVideoCategory(params) {
  return request({
    url: '/video/modify/category',
    method: 'post',
    params
  })
}

/**
 * @description 获取所有视频分类列表
 * @author Jim
 * @date 2021-02-02
 * @param params
 */
export function getVideoListCategory(params) {
  return request({
    url: '/video/list/category',
    method: 'get',
    params
  })
}

/**
 * @description  增加视频标签
 * @author Jim
 * @date 2021-02-02
 * @param data
 */
export function addVideoTag(data) {
  return request({
    url: '/video/add/tag',
    method: 'post',
    data
  })
}

/**
 * @description  编辑视频标签
 * @author Jim
 * @date 2021-02-17
 * @param data
 */
export function modifyVideoTag(data) {
  return request({
    url: '/video/modify/tag',
    method: 'post',
    data
  })
}

/**
 * @description 分页条件查询标签列表
 * @author Jim
 * @date 2021-02-02
 * @param params
 */
export function getVideoTagList(params) {
  return request({
    url: '/video/list/tag',
    method: 'get',
    params
  })
}

/**
 * @description 删除视频标签
 * @author Jim
 * @date 2021-02-17
 * @param params
 */
export function deleteVideoTag(params) {
  return request({
    url: '/video/delete/tag',
    method: 'post',
    params
  })
}



/**
 * @description 删除视频
 * @author Jim
 * @date 2021-02-11
 * @param data
 */
export function deleteVideo(params) {
  return request({
    url: '/video/delete',
    method: 'post',
    params
  })
}